<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>
        //es6中加入了let if for的块级别作用域  改为let关键字
        {
            var name ="huran";
            console.log(name)
        }
        var abc;
        console.log(name)
        if(teue){
            var name ="aaa"
            abc=function(){
                console.log(name)
            }
          // abc()
        }
        abc()
        let b="aaa"
        console.log(b)
        console.log(name)
    </script>
</body>
</html>